Stream Files

Stream file support was added with version 5.1. From that on you can compile test suites from source stream files stored in the IFS /root file system.

Template File

The stream file source templates are stored in members RPGSTMF and RPGSQLSTMF of file QTEMPLATE. They can be stored in the /root file system on demand.

Compiling Test Suite

The new parameters for compiling stream files are:

Please refer to the help of the CRTRPGMOD command for a detailed description of the parameters.

Include Stream Files

The test suite template includes the TESTCASE member/stream file for loading the assertion prototypes. By default it is loaded from the iRPGUnit library. But it is also possible to load it from a stream file by setting the compiler condition IRPGUNIT_STMF.

Example:

RPGUNITDVP/RUCRTRPG 
  TSTPGM(QTEMP/RPGSTMF)          
  SRCSTMF('./iRPGUnit/QTEMPLATE/rpgsqlstmf.sqlrpgle')
  BNDSRVPGM(RPGUNIT/RUTESTCASE)                      
  DEFINE(IRPGUNIT_STMF)                              
  RPGPPOPT(*LVL1)                                    
  INCDIR('./iRPGUnit')                               
  TGTCCSID(*JOB)                                     

Description of parameters:

1.TSTPGM  Specifies the name of the test suite service program.
Applies for compiling from source members as well.
2.SRCSTMF  Specifies the stream file for compiling the service program.
Only used for compiling from stream files.
3.BNDSRVPGM Specifies the iRPGUnit runtime service program.
Used here, because the author does not have the iRPGUnit library in the library list.
4.DEFINE  Sets compiler condition IRPGUNIT_STMF.
Required, because the author wants to load includes from stream files.
5.RPGPPOPT  Instructs the SQL pre-compiler to resolve includes before processing the source.
Required for getting around error message SQL8032: The source file CCSID 1208 is a Unicode CCSID which cannot be used with CVTCCSID(*NONE).
6.INCDIR  Specifies path for loading included source stream files.
Required for resolving included source stream files.
3.TGTCCSID  Specifies the CCSID for translating the source stream file.
Required for getting around error message RNS9380: The source file CCSID 1208 is a Unicode CCSID which cannot be used with TGTCCSID(*SRC).